<?php
/**
 * Created by PhpStorm.
 * Author: 芸签cms www.yunqiancms.com
 * User: sun
 * Date: 2022/9/27
 * Time: 1:44 PM
 */
namespace app\frontend\modules\site\services;

use app\common\facades\Setting;
use app\common\helpers\MobileDetect;

class SiteBaseService
{
    public function siteInfo():array {
        $siteInfo = Setting::get('cms.site');
        $siteInfo['site_name'] = fmt_media_url($siteInfo['site_name']);
        $siteInfo['site_logo'] = fmt_media_url($siteInfo['site_logo']);
        $siteInfo['title_icon'] = fmt_media_url($siteInfo['title_icon']);
        $siteInfo['advertisement'] = fmt_media_url($siteInfo['advertisement']);
        return $siteInfo;
    }
    public function isMobile():bool {
        return (new MobileDetect())->isMobile();
    }
}